import numpy as np
import random

def func(x, a, b, c):
    return a * np.exp(b * x) + c

def func_mi(t,c1,c2,c0):
    return c1*(t**c2)+c0

def func_s(t,c0,c1,c2):
    if 0 < c1 and c1 < 1:
       return c2/((1+c0*c1*t)**(1/c1))
    else:
       return 0

def func_tiao(t,c0,c1):
    return c1/(1+c0*t)

def func_line_1(x,k,b):
    return k*x + b

def func_line_2(x,a,b,c):
    return a*(x**2) + b*x + c

def func_line_3(x,a,b,c,d):
    return a*(x**3) + b*(x**2) + c*x + d

def get_test_data():
    a = []
    for i in range(10):
        temp = func_s(i,1,1,2)
        temp += random.uniform(0,0.01)
        temp = format(temp,'.2f')
        a.append(temp)
    print(a)
# get_test_data()
w = [
   2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
  ]
y = [
   1,2,3,4,5,6,7,8,9,10
  ]
r = [
   3.01,4.72,9.39,22.09,56.60,150.42,405.43,1098.64,2982.96,8105.09
  ]

